package com.mkait.thief.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName user_analysis
 */
@TableName(value ="user_analysis")
@Data
public class UserAnalysis implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 
     */
    @TableField(value = "date")
    private Date date;

    /**
     * 
     */
    @TableField(value = "day_amount")
    private BigDecimal dayAmount;

    /**
     * 
     */
    @TableField(value = "order_count")
    private Integer orderCount;

    /**
     * 
     */
    @TableField(value = "finally_amount")
    private BigDecimal finallyAmount;

    /**
     * 利润
     */
    @TableField(value = "profit")
    private BigDecimal profit;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserAnalysis other = (UserAnalysis) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()))
            && (this.getDayAmount() == null ? other.getDayAmount() == null : this.getDayAmount().equals(other.getDayAmount()))
            && (this.getOrderCount() == null ? other.getOrderCount() == null : this.getOrderCount().equals(other.getOrderCount()))
            && (this.getFinallyAmount() == null ? other.getFinallyAmount() == null : this.getFinallyAmount().equals(other.getFinallyAmount()))
            && (this.getProfit() == null ? other.getProfit() == null : this.getProfit().equals(other.getProfit()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode());
        result = prime * result + ((getDayAmount() == null) ? 0 : getDayAmount().hashCode());
        result = prime * result + ((getOrderCount() == null) ? 0 : getOrderCount().hashCode());
        result = prime * result + ((getFinallyAmount() == null) ? 0 : getFinallyAmount().hashCode());
        result = prime * result + ((getProfit() == null) ? 0 : getProfit().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", date=").append(date);
        sb.append(", dayAmount=").append(dayAmount);
        sb.append(", orderCount=").append(orderCount);
        sb.append(", finallyAmount=").append(finallyAmount);
        sb.append(", profit=").append(profit);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}